﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

/// <summary>
/// Multi litral is extended literal where the text is the default fall back, and the id fetches a resources content depending on user language (TODO)
/// </summary>
/// 
namespace Shut.UIControls
{
	public class MultiLiteral : Literal
	{
		public string CurrentLocale
		{
			get
			{
				return "en"; // TODO: code up
			}
		}
		public string ResourceId
		{
			get;
			set;
		}
		public bool ToSentenceCase {
			get; set;
		}
		public MultiLiteral()
		{
		
		}
		protected override void Render(HtmlTextWriter writer)
		{

			// lookup resource by id and local language, set text
			//Text = "ayyash w bass" + Text;
			if (ToSentenceCase == true) Text = Utils.ToSentenceCase(Text);
			base.Render(writer);
		}
	}
}